#pragma once

#include "condition.h"


namespace BAA
{

	class Action_Talk:public Action
	{
	public:


		Action_Talk(const string name, Vector2 * range):Action(name)
		{
			mRange.x = range->x;
			mRange.y = range->y;

			mAngerFactor = 0.3f;
			mFearFactor = 0.3f;
			
		}


		virtual void PrepareConditions()
		{
			// set target to Role Target.
			mTargets = mRoleParent->Targets();
		}

		virtual float CalculateStateUtility()
		{
			AgentProperties * properties = mRoleParent->Self()->Properties();

			// run when very scared, or angry, or really needing exercise
			return MathHelper.clamp(&mRange, 
				abs(mAngerFactor - properties->mAnger->GetValue()) +
				abs(mFearFactor  - properties->mFear->GetValue())  +
				

		}






		~Action_Talk()
		{

		}

	protected:
		// any members

		Vector2 mRange;

		float mAngerFactor;
		float mFearFactor;
	};// end class
}// end namespace
